<template>
  <div class="k_data">
    <!-- 左 -->
    <div class="left">
      <p class="num1">0.0255</p>
      <p class="num2">
        <span>≈0.88 CNY</span>
        <span class="cut_number">-20.55%</span>
      </p>
    </div>
    <!-- 右 -->
    <div class="right">
      <div class="top">
        <div>
          <p class="font_color">24H 高</p>
          <p>{{tickers.high24h || 0}}</p>
        </div>
        <div>
          <p class="font_color">24H 量(TLOS)</p>
          <p>{{ tickers.vol24h || 0 }}</p>
        </div>
      </div>
      <div class="bot">
        <div>
          <p class="font_color">24H 低</p>
          <p>{{tickers.low24h || 0}}</p>
        </div>
        <div>
          <p class="font_color">24H 额(USDT)</p>
          <p>{{ tickers.volCcy24h || 0}}</p>
        </div>
      </div>
    </div>
  </div>
</template>

<script setup lang="ts">
import { ref } from 'vue';

const props = defineProps(["tickers"])

</script>

<style lang="scss" scoped>
.k_data {
  display: flex;
  align-items: center;
  div {
    flex: 1;
  }
  .left {
    .num1 {
      font-size: 30px;
    }
    .num2 {
      span {
        margin-right: 10px;
      }
    }
  }
  .right {
    font-size: 14px;
    &>div {
     margin-bottom: 5px;
     display: flex;
     justify-content: space-between;
    }
    .bot {
      margin-bottom: 0;
    }
  }
}
</style>
